import http from '../util/http.js'

const createUrl = '/order/create'
const csUrl = '/order/cs'
const modifySta1Url = '/order/modifySta1'
const deleteOrderUrl = '/order/deleteOrder'
const queryByUidUrl = '/order/queryByUid'
const queryByUidAndStaUrl = '/order/queryByUidAndSta'
const queryBySidAndStaUrl = '/order/queryBySidAndSta'
const modifySta2Url = '/order/modifySta2'
const modifySta3Url = '/order/modifySta3'
const modifySta4Url = '/order/modifySta4'
const create2Url = '/order/create2'
const modifyTAndAUrl = '/order/modifyTAndA'
const modifyStaListUrl = '/order/modifyStaList'
const deleteOrderListUrl = '/order/deleteOrderList'
const queryByIdUrl = '/order/queryById'
const removeByIdUrl = '/order/removeById'

const create = (data) => {
    return http.post(createUrl, data)
}

const cs = (data) => {
    return http.get(csUrl, data)
}

const modifySta1 = (data) => {
    return http.put(modifySta1Url, data)
}

const deleteOrder = () => {
    return http.del(deleteOrderUrl)
}

const queryByUid = () => {
    return http.get(queryByUidUrl)
}

const queryByUidAndSta = (data) => {
    return http.get(queryByUidAndStaUrl, data)
}

const queryBySidAndSta = (data) => {
    return http.get(queryBySidAndStaUrl, data)
}

const modifySta2 = (data) => {
    return http.put(modifySta2Url,data)
}
const modifySta3 = (data) => {
    return http.put(modifySta3Url,data)
}

const create2 = (data) =>{
    return http.post(create2Url,data)
}

const modifyTAndA = (data) =>{
    return http.put(modifyTAndAUrl,data)
}

const modifyStaList = () =>{
    return http.put(modifyStaListUrl)
}

const deleteOrderList = () =>{
    return http.del(deleteOrderListUrl)
}

const queryById = (data) =>{
    return http.get(queryByIdUrl,data)
}

const modifySta4 = (data) => {
    return http.put(modifySta4Url,data)
}

const removeById = (data) =>{
    return http.del(removeByIdUrl,data)
}


export default {
    create, cs, modifySta1, deleteOrder, queryByUid,
    queryByUidAndSta, queryBySidAndSta, modifySta2,create2,
    modifyTAndA,modifyStaList,deleteOrderList,modifySta3,queryById,
    modifySta4,removeById

}